<template>
  <div class="search">
    <van-search
      v-model="value"
      placeholder="请输入搜索关键词"
      @search="onSearch"
      class="sousuo"
      right-icon="search"
      left-icon="null"
    >
      <template #label>
        <select class="select" value="用户">
          <option value="用户">用户</option>
          <option value="店铺">店铺</option>
        </select>
      </template>
    </van-search>
  </div>
</template>

<script lang="ts" setup>
import { ref } from "vue";

const value = ref("");
const onSearch = (val: any) => {
  console.log("val: ", val);
};
const onClickButton = () => {
  value.value;
};
</script>

<style scoped>
.search {
  height: 3.55rem;
  width: 100%;
  z-index: 999;
  background: #1a9956;
}
.sousuo {
  background: transparent;
  z-index: 999;
}
.select {
  border: none;
}
</style>